/**
 * @file 
 * @description 公共库
 * 
 *  */
import { MessageBox } from "element-ui"


/**
 * @file 
 * @description 公共库
 * @param {stying} message 提示的内容
*   @param {stying} title 提示的标题
 * 
 *  */
export const confirm = (message, title = "提示") => {
    return new Promise((resolve, reject) => {
        MessageBox.confirm(message, title, {
            callback(action) {
                switch (action) {
                    case 'confirm':
                        resolve()
                        break;
                    case 'cancel':
                        reject()
                        break;


                }
            }
        })
    })
}